import '../node_modules/amfe-flexible/index.min.js';
type themeEnum = 'default' | 'danger';
addEventListener('DOMContentLoaded', () => {
  const btn = document.getElementById('btn');
  let currentTheme: themeEnum = 'default';
  if (btn) {
    btn.addEventListener('click', () => {
      const themeLink = document.getElementsByClassName('theme-link').item(0);
      if (themeLink) {
        currentTheme = currentTheme === 'default' ? 'danger' : 'default';
        themeLink.setAttribute('href', `src/styles/themes/${currentTheme}.css`);
      }
    });
  }
});

const obj = {
  name: 'ccc'
}

console.log(obj?.name);